/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.itcast;

/**
 * <p>Project: JavaStudy - OutputStyle
 * <p>Powered by jiangbo On 2023-02-25
 * 10:40:48
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class OutputStyle {
    public static void main(String[] args) {
        //30 - 37 文字颜色 黑 红 绿 黄 紫
        System.out.printf(" helloworld %n");
        System.out.printf("\033[30m helloworld \033[0m%n");
        System.out.printf("\033[31m helloworld \033[0m%n");
        System.out.printf("\033[32m helloworld \033[0m%n");
        System.out.printf("\033[33m helloworld \033[0m%n");
        System.out.printf("\033[34m helloworld \033[0m%n");
        System.out.printf("\033[35m helloworld \033[0m%n");
        System.out.printf("\033[36m helloworld \033[0m%n");
        System.out.printf("\033[37m helloworld \033[0m%n");
        System.out.printf("\033[38m helloworld \033[0m%n");
        System.out.println("*".repeat(30));
//40 - 47 背景颜色
        System.out.printf(" helloworld %n");
        System.out.printf("\033[40m helloworld \033[0m%n");
        System.out.printf("\033[41m helloworld \033[0m%n");
        System.out.printf("\033[42m helloworld \033[0m%n");
        System.out.printf("\033[43m helloworld \033[0m%n");
        System.out.printf("\033[44m helloworld \033[0m%n");
        System.out.printf("\033[45m helloworld \033[0m%n");
        System.out.printf("\033[46m helloworld \033[0m%n");
        System.out.printf("\033[47m helloworld \033[0m%n");
        System.out.printf("\033[48m helloworld \033[0m%n");
        System.out.println("*".repeat(30));
        System.out.printf("\033[33;41m helloworld \033[0m%n");
        System.out.println("*".repeat(30));
        System.out.printf("\033[0m helloworld \033[0m%n");
//加粗
        System.out.printf("\033[1m helloworld \033[0m%n");
//斜体
        System.out.printf("\033[3m helloworld \033[0m%n");
//下滑线
        System.out.printf("\033[4m helloworld \033[0m%n");
        System.out.println("*".repeat(30));
//黄字，背景为红，文字效果为斜体
        System.out.printf("\033[33;41;3m helloworld \033[0m%n");

    }
}


